package com.betterwood.dragon.core.config;

import lombok.Data;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 公众号配置
 * @author admin060816
 *
 */
@Data
@Component
@ConfigurationProperties(prefix= "wechat")
public class WechatMpConfig implements InitializingBean {

	private String appId;
	private String appSecret;
	/**
	 * 公众号token
	 */
	private String token;

	private TemplateMsg templateMsg = new TemplateMsg();


	public static String APP_ID;
	public static String APP_SECRET;
	public static String TOKEN;

	@Override
	public void afterPropertiesSet() throws Exception {
		APP_ID=appId;
		APP_SECRET=appSecret;
		TOKEN=token;
	}

	//模板消息集合
	@Data
	public static class TemplateMsg {
		private String boardingNotice;//登机提醒
		private String renewUserRestTimeNotice;//休息继续到期续费提醒
	}
}
